package com.usian.vo;

import lombok.Data;
import lombok.ToString;

/**
 * @author 陈宇轩
 * @version 1.0
 * @date 2023/8/22 10:55
 */

@Data
@ToString
public class ResultResponse<T> {
    private String code;
    private String methods;
    private T data;

    public static ResultResponse<Object> Success(Object data){
        ResultResponse<Object> response = new ResultResponse<>();
        response.setCode("1");
        response.setMethods("SUCCESS");
        response.setData(data);
        return response;
    }

    public static ResultResponse<Object> Errer(){
        ResultResponse<Object> response = new ResultResponse<>();
        response.setCode("2");
        response.setMethods("ERROR");
        return response;
    }
}
